// TODO: CODE REVIEW & CLEANUP!
//
// LogItem.cs
//
// Implements LogItem and related types.
//

using System.Windows;
using System.Windows.Controls;

namespace HomeUX.Controls
{

//[TemplatePart(Name = LayoutRootName, Type = typeof(Panel))]
//[TemplatePart(Name = IconName, Type = typeof(FrameworkElement))]
//[TemplatePart(Name = MessageTextBlockName, Type = typeof(TextBlock))]
public class LogItem : Control //, IControlHelperConnector
{
    //const string LayoutRootName = "LayoutRoot";
    //const string IconName = "Icon";
    //const string MessageTextBlockName = "MessageTextBlock";

    //Panel _layoutRoot;
    //FrameworkElement _icon;
    //TextBlock _messageTextBlock;

    public static readonly DependencyProperty IconProperty =
        DependencyProperty.Register("Icon", typeof(FrameworkElement), typeof(LogItem), null);
    public static readonly DependencyProperty MessageProperty =
        DependencyProperty.Register("Message", typeof(string), typeof(LogItem), null);

    public FrameworkElement Icon
    {
        get
        {
            return (FrameworkElement)GetValue(IconProperty);
        }
        set
        {
            SetValue(IconProperty, value);
        }
    }

    public string Message
    {
        get
        {
            return (string)GetValue(MessageProperty);
        }
        set
        {
            SetValue(MessageProperty, value);
        }
    }

    public LogItem()
    {
        DefaultStyleKey = typeof(LogItem);
    }

    /*
    public override void OnApplyTemplate()
    {
        base.OnApplyTemplate();

        //ControlHelper.GetRequiredTemplateChild(this, LayoutRootName, out _layoutRoot);
        //ControlHelper.GetRequiredTemplateChild(this, IconName, out _icon);
        //ControlHelper.GetRequiredTemplateChild(this, MessageTextBlockName, out _messageTextBlock);
    }
    */

    /*
    #region IControlHelperConnector Members

    Control IControlHelperConnector.GetControl()
    {
        return this;
    }

    DependencyObject IControlHelperConnector.GetTemplateChild(string childName)
    {
        return GetTemplateChild(childName);
    }

    #endregion
    */
}

}

